import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class E3 {
  /**
   * @param args
   */
  public static void main(String[] args) {
    String text = "Testing is important. We need to test everything.";
    Pattern pattern = Pattern.compile("test\\w*", Pattern.CASE_INSENSITIVE);
    Matcher matcher = pattern.matcher(text);
    while(matcher.find()) {
      String found = text.substring(
          matcher.start(),matcher.end()); 
      System.out.println(found);
    }
  }
}
